package com.marktotop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.marktotop.entity.business.VaccinationSite;
import com.marktotop.vo.business.SiteAndVaccsVO;
import com.marktotop.vo.business.VaccSitesVO;
import com.marktotop.vo.business.VaccineAndSitesVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-12
 */
public interface VaccinationSiteMapper extends BaseMapper<VaccinationSite> {

    /**
     * 模糊查询，分页展示所有接种点信息
     *
     * @param page
     * @param site
     * @return
     */
    IPage<VaccinationSite> getSitesByPage(Page<VaccinationSite> page, @Param("site") VaccinationSite site);


    /**
     * 获取所有接种点列表，供疫苗下发使用
     *
     * @return
     */
    List<VaccSitesVO> getAllSitesForOther();


    /**
     * 获取该接种地的所有疫苗信息
     *
     * @param id
     * @return
     */
    SiteAndVaccsVO selectSiteVaccines(Long id);


    /**
     * 查询所有拥有某一疫苗的接种地点信息
     *
     * @param id
     * @return
     */
    VaccineAndSitesVO selectAllSiteByVid(Long id);
}
